'UsageDim instance As IReadOnlyKeyedCollection(Of TKey,TItem) Dim key As TKey Dim item As TItem Dim value As Boolean value = instance.TryGetValue(key, item)
Parameters
- key
- The key of the item to search in the collection.
The value of this parameter cannot be
null(Nothingin Visual Basic). - item
- When this method returns
true, the item from the collection that matches the provided key; when this method returnsfalse, thedefaultvalue for the type of the collection.The value of this parameter can be
null(Nothingin Visual Basic).
Return Value
true if an item for the specified key was found in the collection; otherwise, false.